package com.innovation.sys.common.utils;

import javax.servlet.http.HttpServletRequest;

public class CodeUtils {
	
	 public static boolean checkVerifyCode(HttpServletRequest request,String code){
	        String verifyCodeExpected = (String)request.getSession().getAttribute(
	                com.google.code.kaptcha.Constants.KAPTCHA_SESSION_KEY);
	        if(!code.equals(verifyCodeExpected) || verifyCodeExpected.isEmpty()){
	            return false;
	        }
	        return true;
	 }
	 
}
